<template>
    <el-dialog v-bind="props">
        <slot></slot>
        <template #footer>
            <h-button plain @click="onClose">取消</h-button>
            <h-button @click="onConfirm?.()">确认</h-button>
        </template>
    </el-dialog>
</template>
<script lang="ts" setup>
import { ElDialog } from 'element-plus';
import type { DialogProps } from 'element-plus'
const props = defineProps<HMODAL.ModalOptions<DialogProps>>()
const emit = defineEmits(['update:modelValue'])
const onClose = () => {
    emit('update:modelValue', false)
    props.onClose?.()
}
</script>